package com.happy3w.ssp.schoolmatehome.component.image.type.image;

import com.happy3w.ssp.schoolmatehome.component.image.Canvas;
import com.happy3w.ssp.schoolmatehome.component.image.LocationDrawAction;

import java.awt.Point;
import java.awt.image.BufferedImage;

public class DrawImageAction extends LocationDrawAction {
    private final BufferedImage image;
    protected DrawImageAction(BufferedImage image, Point location) {
        super(location);
        this.image = image;
    }

    @Override
    public void draw(Canvas canvas) {
        canvas.drawImage(image, location);
    }
}
